Don't do completion in the middle of an incomplete hostname
authorFederico Mena Quintero <federico@novell.com>
Wed, 21 Jan 2009 03:17:01 +0000 (03:17 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Wed, 21 Jan 2009 03:17:01 +0000 (03:17 +0000)
commite4bc68ba04100e32a4945a753543549e306c1276
treef95bf6abd65c361ba7a428fdb099399f6e3b7396
parent2c07a59e5496ba1f677a29068f5199c3f0c27b22
Don't do completion in the middle of an incomplete hostname
Fix completion so it doesn't pop up for every character in a URI
hostname:

* gtk/gtkfilechooser.h (GtkFileChooserError): Add a
GTK_FILE_CHOOSER_ERROR_INCOMPLETE_HOSTNAME.

* gtk/gtkfilesystem.c (_gtk_file_system_parse): Return an
"incomplete hostname" error if the user has not typed a full
hostname yet in an URI.

* gtk/gtkfilechooserentry.c (append_common_prefix): If we get an
incomplete hostname, just don't pop up an error, since that is a
transient state and the user doesn't need to be notified about it.
(refresh_current_folder_and_file_part): Don't revert to showing
the base folder if we have an incomplete hostname.
(reload_current_folder): Handle the passed folder being NULL, even
if we must force a reload.  Also, reload the folder if we didn't
have a cancellable for it (i.e. we hadn't started to load it
before).

Signed-off-by: Federico Mena Quintero <federico@novell.com>
svn path=/trunk/; revision=22157
ChangeLog
gtk/gtkfilechooser.h
gtk/gtkfilechooserentry.c
gtk/gtkfilesystem.c